<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-spring4-4.dtd">
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <title>查刀面板</title>
    <meta charset="utf-8">

    <link rel="stylesheet" type="text/css" href="../../css/hui/H-ui.min.css" />
    <link rel="stylesheet" type="text/css" href="../../css/hui/H-ui.admin.css" />
</head>
<body>

<div style="padding-top: 20px;">
   <span class="select-box"  style="width:150px;">
       <select class="select" id="date" onchange="refreshData(this.options[this.options.selectedIndex].value);">
            <!--/*@thymesVar id="result" type="com.alibaba.fastjson.JSON"*/-->
            <option  th:each="date : ${result}" th:text="${date}" th:value="${date}" > </option>
        </select>
    </span>
    <span id="knifeBoard"></span>
</div>

<table class="table table-border table-bordered table-hover table-bg">
    <thead>
        <tr class="text-c">
            <th colspan="1" rowspan="2" width="5%">@</th>
            <th colspan="1" rowspan="2" width="10%">QQ号</th>
            <th colspan="1" rowspan="2" width="10%">昵称</th>
            <th colspan="2" rowspan="1" width="25%">第一刀</th>
            <th colspan="2" rowspan="1" width="25%">第二刀</th>
            <th colspan="2" rowspan="1" width="25%">第三刀</th>
        </tr>
        <tr class="text-c">
            <th colspan="1" rowspan="1" width="12.5%">尾刀</th>
            <th colspan="1" rowspan="1" width="12.5%">补偿刀</th>
            <th colspan="1" rowspan="1" width="12.5%">尾刀</th>
            <th colspan="1" rowspan="1" width="12.5%">补偿刀</th>
            <th colspan="1" rowspan="1" width="12.5%">尾刀</th>
            <th colspan="1" rowspan="1" width="12.5%">补偿刀</th>
        </tr>
    </thead>
    <tbody id="table_data"></tbody>
</table>
<script src="../../jquery/jquery-2.1.1.min.js"></script>
<script src="../../common.util.js"></script>
<script th:inline="javascript">
    $(function(){
        refreshData();
    });
    var gid = [[${gid}]];
    function refreshData() {
        $.ajax({
            type : "POST",
            dataType : "HTML",
            url : getApiPath()+'/pcr/guild/api/checkKnife',
            data : {
                dateStr : $("#date").val(),
                gid : gid
            },
            success : function(result) {
                $("#table_data").empty().append(result);
            },
            error : function() {
                console.log(result);
            }
        });
    }
</script>

</body>
</html>